package com.nkzy.exception;

import com.nkzy.models.R;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionHandler {


    @org.springframework.web.bind.annotation.ExceptionHandler(ServiceException.class)
    public R<Void> handleException(ServiceException exception) {
        return R.failure(exception.getMsg());
    }

}
